
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<%@page import="com.tss.util.*"%>
<%@page import="com.store.*"%>
<%@page import="java.text.*"%>
<%@page import="com.jedi.*"%>
<%@include file="../global_var.jsp"%>
<%@include file="../check_login.jsp"%>

<%

String techmanager    = ParamUtils.getParameter(request,"techmanager","");

int comid     = ParamUtils.getIntParameter(request,"comid",0);
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String enddate = new SimpleDateFormat("yyyy-MM-dd").format(Calendar.getInstance().getTime());
Calendar calen = Calendar.getInstance();
calen.setTime(TSSDate.parseDate(enddate));
calen.add(Calendar.MONTH, -1);
String begindate = new SimpleDateFormat("yyyy-MM-dd").format(calen.getTime());
String begin_date = ParamUtils.getParameter(request, "begin_date",begindate);//开始时间
String end_date = ParamUtils.getParameter(request, "end_date",enddate);//结束时间
User just_user = (User)session.getAttribute("LoginUser");
String power_enable_id = "10104";
if (!just_user.hasPower(power_enable_id)) {
	out.println(strNoPowerInfo); 
	return;
}
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'contract_search.jsp' starting page</title>
    
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    
   <link href="style/main.css" rel="stylesheet" type="text/css">
<script language="javascript" src="js/common.js"></script>
<script language="javascript">
function chk_submit() {
	var oForm = document.operatorForm;
	oForm.action = "outcontract_mgt/outcon_list.jsp";
	return true;
}
</script>
</head>
<body 
	leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td >
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			
			<tr>
				<td height="100" align="center" valign="top"
					style="padding-top:20px;padding-bottom:10px;">
					<form name="operatorForm" method="post"
						onsubmit="return chk_submit();">
				<table width="80%" border="0" cellpadding="3" cellspacing="1"
					bgcolor="#FFFFFF">
					
					
					<tr>
						<td height="24" align="right" bgcolor="#858585"><font
							color="#FFFFFF">所在区域：</font></td>
						<td bgcolor="#EDEDF0">
						
                  <select name="area_id"  style="width:100px">
                   <option value="">==请选择==</option>
                    <%for(int i=0;i<area_item_info.length;i++){%>
                    <option value="<%=area_item_info[i]%>"><%=area_item_info[i]%></option>
                    <%}%>
                  </select>
						</td>
					</tr>
					
					<tr>
						<td height="24" align="right" bgcolor="#858585"><font
							color="#FFFFFF">服务合同号：</font></td>
						<td bgcolor="#EDEDF0"><input name="serviceid" type="text"
							value="" size="30" maxlength="50" class="inputbox"></td>
					</tr>
					
					
					<tr>
						<td height="24" align="right" bgcolor="#858585"><font
							color="#FFFFFF">项目名称：</font></td>
						<td bgcolor="#EDEDF0"><input name="prjname" type="text"
							value="" size="50" maxlength="100" class="inputbox"></td>
					</tr>
						 <tr>
						<td height="24" align="right" bgcolor="#858585"><font
							color="#FFFFFF">项目经理：</font></td>
                  <td bgcolor="#EDEDF0">
                   <select name="techmanager" id="techmanager"  style="width:100px">
            	        <option value="">==请选择==</option>
            	        <%
            	        	UserMgr userMgr = new UserMgr();
            	    String manager="pm";
            	     List    list = userMgr.getUsersGroupbyroleid(manager);
            	        if (list != null && list.size() > 0) {
                    		for(int i=0;i<list.size();i++){
                    			User item = (User)list.get(i);
                    	%>
                        <option value="<%=item.getId()%>"<%if (item.getId().trim().equals(techmanager)) {%> selected<%}%>><%=item.getUserName()%></option>
                    	<%}}%>
            	      </select>
                   
                   </td>
                 </tr>
					<tr>
						<td height="24" align="right" bgcolor="#858585"><font
							color="#FFFFFF">厂商名称：</font></td>
						<td bgcolor="#EDEDF0">
					 <select  name="comid" style="width:100px" >
				  <option value="0">==请选择==</option>
                    <%
                  CompanyMgr comMgr = new CompanyMgr();
                    list =comMgr.getCompanys();
                    if (list != null && list.size() > 0) {
                    	for(int i=0;i<list.size();i++) {
                    		Company item = (Company)list.get(i);
                    %>
                    <option value="<%=item.getComid()%>" <%if (item.getComid()==comid) {%> selected<%}%>><%=item.getComnam()%></option>
                    <%
                    }
                    }
                    %>
 
			</select></td>
					</tr>
					<tr>
						<td height="24" align="right" bgcolor="#858585"><font
							color="#FFFFFF">销售员：</font></td>
						<td bgcolor="#EDEDF0"><SELECT name="saleid" style="width:100px">
													<OPTION value="">
														 ==请选择==
													</option>
													 <%
				
					String saler="saler";
                    list =userMgr .getUsersGroupbyroleid(saler);
                    if (list != null && list.size() > 0) {
                    	for(int i=0;i<list.size();i++) {
                    		User item = (User)list.get(i);
                    %>
                    <option value="<%=item.getId()%>"  ><%=item.getUserName()%></option>
                    <%
                    }
                    }
                    %>
												</SELECT>
							</td>
					</tr>
              
              <tr>
						<td height="24" align="right" bgcolor="#858585">
						<font
							color="#FFFFFF">登记日期：</font></td>
						<td bgcolor="#EDEDF0">
						 			
              
                  从 <span id="htmlBeginTime">&nbsp;</span> &nbsp; 至 &nbsp; <span id="htmlEndTime" >&nbsp;</span>
					</td>
					</tr>
					<tr>
						<td height="24" align="right" bgcolor="#EDEDF0">&nbsp;</td>
						<td bgcolor="#EDEDF0"><input type="submit" name="submit" value="搜 索" class="inputButton"> 
							<input type="reset" name="reset" value="重 写" class="inputButton"> 
							<input type="hidden" name="cmd" value="">
						
			
						</td>
					</tr>
					
				</table>
				</form>
				</td>
			</tr>
		</table>
		</td>
	</tr>
</table>

	<script language="javascript">
	htmlBeginTime.innerHTML = showCalenderInput("begin_date","operatorForm","<%=begin_date%>",1);
	htmlEndTime.innerHTML = showCalenderInput("end_date","operatorForm","<%=end_date%>",1);
</script>
</body>
</html>
